package com.liam.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: LiamLMK
 * @CreateTime: 2024-10-22
 * @Description:
 * @Version: 1.0
 */
@AllArgsConstructor
@Getter
public enum ActivityStatusEnum {

    RUNNING(1, "活动进行中"),

    COMPLETED(2, "活动已完成"),
    ;



    private final Integer code;

    private final String message;

    public static ActivityStatusEnum forName(String name) {
        for (ActivityStatusEnum activityStatusEnum : ActivityStatusEnum.values()) {
            if (activityStatusEnum.name().equals(name)) {
                return activityStatusEnum;
            }
        }
        return null;
    }
}
